<template>
	<div class="div_app">
		<div class="div_navi" >
			<van-nav-bar
			title="登录"
			/>
		</div>
		<van-form @submit="onSubmit" style="margin-top:50px;">
			<van-field
			v-model="dataForm.account"
			name="用户名"
			label="用户名"
			placeholder="用户名"
			:rules="[{ required: true, message: '请填写用户名' }]"/>
			<van-field
			v-model="dataForm.password"
			type="password"
			name="密码"
			label="密码"
			placeholder="密码"
			:rules="[{ required: true, message: '请填写密码' }]"/>
			<div style="margin: 16px;">
				<van-button round block type="info" native-type="submit" @click="confirm">
					提交
				</van-button>
			</div>
		</van-form>
	</div>
</template>
<script>
	export default {
		data() {
			return {
				dataForm: {
					account: undefined,
					password: ""
				},
				loading: true
			};
		},
		created() {
			let _this = this;
			_this.loading = false;
		},
		methods: {
			confirm() {
				//
				let _this = this;
				_this.loading = true;
				// let msg = _this.dataForm.account + "<br/>" + _this.dataForm.password;
				//
				// _this.$dialog.alert({
				// 	title: "提示",
				// 	message: msg,
				// 	showConfirmButton: true
				// });
				this.$router.push({ path: '/map' });
			}
		}
	};
</script>